﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<OnlineLibrary.Linq.tblUser>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Details
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Details <%=ViewData["UserName"] %> </h2>
    <table>
     <tr>
        <th>
            User ID
        </th>
         <th>
            Name
        </th>
         <th>
            UserName
        </th>
         <th>
            Address
        </th>
        <% if ((Boolean.Parse(Session["Admin"].ToString()) == true || Boolean.Parse(Session["Staff"].ToString()) == true) ) 
            { %>     
                <th>
                    Role
                </th> 
            <% } %>
         <th>
            User Status
        </th>
        </tr>
    
        <tr>
            <td>
                <%: Model.UserId %>
            </td>
            <td>
                <%: Model.Name %>
            </td>
            <td>
                <%: Model.UserName %>
            </td>
            <td>
                <%: Model.Address %>
            </td>

             <% if ((Boolean.Parse(Session["Admin"].ToString()) == true || Boolean.Parse(Session["Staff"].ToString()) == true) ) 
            { %>     
                <td>
                    <%: Model.Role %>
                </td> 
            <% } %>
                                   
            
            <%if (Model.UserStatus == true)
              {%>
            <td>Đang mượn sách</td>
                <%}
              else
              {%>
              <td>Không mượn sách</td>
                <%} %>
            
        </tr>
    
    </table>
    <div>
        <% if ((Boolean.Parse(Session["Admin"].ToString()) == true || Boolean.Parse(Session["Staff"].ToString()) == true) ) 
       { %>
        <% =Html.ActionLink("Back to List", "Index")%>
        <% } else if (Boolean.Parse(Session["User"].ToString()) == true)
           { %>
            <% =Html.ActionLink("Back to List", "Index")%>
           <% } %>
    </div>



    
    
    



</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="PlaceHolderNavigation" runat="server">
</asp:Content>
